package com.jindouyun.consumer.controller;

import com.jindouyun.api.model.user.dto.UserQueryDTO;
import com.jindouyun.api.service.user.IUserService;
import com.jindouyun.common.annotations.JDYReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @className: com.jindouyun.consumer.controller.UserController
 * @description: 用户相关的Rest API
 * @author: tong.li
 * @createTime: 2021/10/12 18:39
 * @copyright: Tongcheng-Elong Holdings Limited
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @JDYReference
    private IUserService userService;

    @PostMapping("queryList")
    public List queryList(@RequestBody UserQueryDTO userQuery) {
        return userService.queryUsersByConditions(userQuery);
    }
}
